<%-- 
    Document   : chat
    Created on : Apr 8, 2011, 9:31:16 PM
    Author     : Muhammad Anis
--%>

<%@page import="tools.writer"%>
<%@page import="user.user"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
            user currentuser = (user) session.getAttribute("currentuser");
            if (currentuser == null) {
                writer.redirect("index.jsp?task=auth", out);
            }
			
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Welcome To Chat Room</title>
        <link rel="stylesheet" href="css/chat.css"/>
        <script type="text/javascript" src="script/script.js"></script>
    </head>
    <body >
        <div id="chat_wrapper">
            <div id="wrapper">
				<div id="logout">
                    <form action="functions/process.jsp?task=logout" method="post">
                        <input type="submit" class="button3" value=""/>
                    </form>
                </div>
                <div id="leftside">
                    <div id="chat_tab">
                        <div id="noavailable">No Available chat yet</div>
                    </div>
                    <div id="chat_area">
                        chat area
                    </div>
                    <div id="chat_command">
                        <form id="chat_form"action="" method="" onsubmit="return false;">
                            <input id="chat_input" type="text" class="input" name="command" autocomplete="off" onkeypress="enterpressed(event,document.getElementById('chat_form'))"/>
                            <input type="button" class="button2" value="" onclick="handleSubmit(document.getElementById('chat_form'))"/>
                        </form>
                    </div>
                </div>
                <div id="rightside">
                    <div id="rooms">
                        No available rooms yet
                    </div>
                    <div id="friends">
                        <%
                                    currentuser.printFriends(out);
                        %>
                    </div>
                </div>
            </div>
        </div>
        <div id="dump"></div>
    </body>
</html>
